In call processing and voice messaging systems coupled to the public switched telephone network, automatic gain control (AGC) is used to control the amplitude of input signals before the signals are sent to a listener. A telephone can receive an extremely wide range of input signal levels, depending on the source of the call and the path taken through the telephone network. The input signal strength may also vary during a call due to actions by the calling party, or changes in the routing of the call through the network. A strong local call is often as much as 100 times "louder" than a weak long distance call.
AGC is used to adjust an input signal with large amplitude variations to a relatively constant listening level. However, AGC compensation must not interfere with content of the input signal. This is usually done by allowing an AGC apparatus to adjust the signal level fairly slowly in the upward direction. This slow increase in gain is referred to as "AGC decay", and the speed of increase in volume is called the "AGC decay rate." To prevent the input signal from becoming too loud, traditional AGC designs also allow for a very quick reduction in volume. This is called an "AGC attack", and the reaction time between the presence of an overly loud signal to the time that AGC adjusts the volume is called the "AGC attack time."
AGC can be implemented using analog electronic circuits, as exemplified by U.S. Pat. No. 4,112,384 (Burchberger). In such prior art circuits an amplifier with variable gain is placed in the input signal path, and feedback is used to control the amplifier output level with resistors and capacitors whose values determine the decay rate of the resulting circuit. The attack time is a function of the amplifier characteristics and the feedback circuitry.
Analog AGC circuits using feedback typically have slow attack times in the range of 5 to 15 milliseconds (ms). During this time too much gain is applied to the input signal, resulting in temporary audible distortion. A quick attack time results in fewer and less detectable AGC "attacks" during the course of a call. However, reduction of the attack time to less than 10 ms has adverse side-affects, such as causing the AGC to reduce the gain for the entire call in response to noise spikes, pops or clicks on the telephone line, even though the volume of input speech has not changed. The listener hears a sudden drop in the level of the call for no apparent reason. Thus, attack time and resistance to noise spikes trade off against each other in traditional AGC implementations.
A similar trade-off in AGC performance is found in the choice of a decay rate. A fast (large) decay rate allows AGC to rapidly adjust to changes in input signal strength. Fast decay is valuable when a caller switches from handset to speakerphone, and there is a sudden drop in the signal strength. Unfortunately, raising the decay rate too high can cause AGC to begin to distort the normal conversational rises and falls in volume level. Additionally, a high decay rate will generally cause more AGC attacks to occur, increasing the chances of audible distortion.
Traditional AGC designs take a fairly conservative approach in the choices of these parameters. An attack time is chosen that causes moderate distortion, but is fairly resistant to spikes. This is coupled with a slow decay rate, which causes few AGC attacks to occur (minimizing the number of 10 ms distortions in a call) but takes a long time to compensate for input level changes. Accordingly, those skilled in the art desire to have a configurable fast automatic gain control system to enable optimizing of these trade-offs.
AGC can also be implemented in digital circuitry for processing digitized samples of voice data, as exemplified by Lovrich, et al., "An All Digital Automatic Gain Control," published by IEEE as D8.18/CH2561-9/88/0000-1734 (1988). However, the high computational needs of prior digital automatic gain control implementations are a significant hindrance to use of these techniques when computation budgets are tight. For example, in a voice messaging system with AGC implemented in software for a digital signal processor (DSP) the DSP must perform many voice processing functions besides AGC. Very few DSP machine cycles are available just for AGC computation. Thus, those of skill in the art would appreciate an efficient implementation to allow other voice-band activity of significant computational cost to run concurrently with the AGC on the DSP.
U.S. Pat. No. 5,016,205 (Shumway) discloses a digital AGC for a DSP, but fails to solve all the problems addressed by this invention. Its buffer is just used for delay during time-consuming computing steps. One problem with Shumway and other digital AGC apparatus is failure to gracefully handle gain control at the start of a call or voice message (known herein as AGC initialization). Establishing a correct gain level at the beginning of a call in an acoustically pleasing way is difficult. If the gain is simply set to a predetermined or target gain level, users hear the sudden change in gain as a "click" sound, which is intrusive. One desirable goal of AGC is to be completely hidden from users so they never know it's there, they simply get pleasant listening levels all the time. Therefore, those of skill in the art would appreciate a digital DSP AGC which can imperceptibly apply gain control at the beginning of a call to eliminate sudden gain changes and clicks.
To properly set gain level, every digital AGC must distinguish background noise from valid speech, since more gain is required when the speech to noise ratio is low. However, noise characteristics of a telephone line can change dramatically during a call. One example is when a user in a noisy room suddenly switches from using a telephone handset to a speakerphone, causing a dramatic increase in background noise. Shumway and other prior art digital AGC apparatus fail to account for such noise level changes. Those of skill in the art would appreciate a DSP AGC which can adapt its noise level settings to change in ambient conditions as changes occur, and thereby dynamically optimize gain control performance.
Also, in the prior art, software AGC parameters (e.g. number of coefficients, various threshold parameters) are not completely configurable, i.e., the parameters cannot all be changed to other values while the messaging system is operational. This is a disadvantage since configurability can be used to "tune" the parameters to the desired level of performance for the available processing power and to match characteristics of the location or site of the system.
Also, the gain adjustment process in prior art AGCs under discussion requires time for attack or decay before the AGC reduces gain to the desired level. Since most AGC systems operate in real time, several milliseconds of perceptible voice data usually pass through an AGC before correct gain level is set, causing temporary audible distortion. This time may be kept to a minimum at a fairly high computational effort, but the attack time is never zero (instantaneous). Thus, those skilled in the art desire a digital AGC with instant or zero attack time for rapid gain control, without high computational overhead.
Those skilled in the art would also appreciate an digital software AGC canceller implemented on a general-purpose DSP which serves multiple channels of voice-band activity while using a minimum number of processor cycles for gain control.